cmake_minimum_required(VERSION 3.22)            #指定版本
project(crtsurfdata)                             #项目名字
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC_LISTS)     #收集一个文件夹下面所有的文件，把那些文件存成一个变量
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/output)  #设置可执行文件生成的地址


set(SRC_LISTS ${SRC_LISTS} ${CMAKE_CURRENT_SOURCE_DIR}/../../public/_public.cpp)
list(REMOVE_ITEM SRC_LISTS ${CMAKE_CURRENT_SOURCE_DIR}/crtsurfdata1.cpp ${CMAKE_CURRENT_SOURCE_DIR}/crtsurfdata2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/crtsurfdata3.cpp ${CMAKE_CURRENT_SOURCE_DIR}/crtsurfdata4.cpp
${CMAKE_CURRENT_SOURCE_DIR}/processShow.cpp ${CMAKE_CURRENT_SOURCE_DIR}/crtsurfdata5.cpp ${CMAKE_CURRENT_SOURCE_DIR}/signalShow.cpp)
#list(APPEND SRC_LISTS ${SRC_LISTS} ${CMAKE_CURRENT_SOURCE_DIR}/../../public/_public.cpp)

add_executable(crtsurfdata ${SRC_LISTS})                         #生成可执行文件


target_include_directories(crtsurfdata PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../public)           #头文件所在的位置
# target_link_directories(crtsurface PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../public)
# target_link_libraries(crtsurface PUBLIC _public)



# 显式指定编译器
set(CMAKE_CXX_COMPILER "g++")                                                                   #设置编译器


# 开启调试信息
set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")

# 开启所有警告
set(CMAKE_CXX_FLAGS "-Wall")